"use strict"
/**
 *
 * @param {import("egg").Application} app
 */
module.exports = app => {
	const Sequelize = app.Sequelize
	const sequelize = app.model
	let empireStore = sequelize.define("empireStore", {
		id: {
			primaryKey: true,
			autoIncrement: true,
			type: Sequelize.SMALLINT
		},
		store_name: {
			type: Sequelize.STRING(20)
		},
		level: Sequelize.INTEGER,
		duration: {
			defaultValue: 50,
			type: Sequelize.DOUBLE,
		},
		base_income: {
			defaultValue: 50,
			type: Sequelize.DOUBLE
		},
		coin_to_update: {
			comment: "单个收入",
			defaultValue: 1000,
			type: Sequelize.DOUBLE
		},
		//total_current_income 动态计算
		coin_to_release: {
			comment: "解锁的",
			defaultValue: 1000,
			type: Sequelize.DOUBLE
		},
		upgrade_price_multiplier: {
			comment: "解锁的基本参数",
			type: Sequelize.FLOAT
		}
	}, {
		tableName: "empire_store",
		timestamps: false
	})
	return empireStore
}